Added format attribute to @Parameter#399
Added format attribute to @Parameter#399BoudewijnvanLangerak wants to merge 1 commit intoscijava:masterfrom
Conversation
imagejan
left a comment
There was a problem hiding this comment.
Thanks @BoudewijnvanLangerak for working on this. Unfortunately, your PR includes significant changes to the public API, and I doubt it will find its way into SciJava any time soon. @ctrueden might want to include something like this into his work on SJC3?
In the past, Curtis suggested to use and extend the style attribute for similar functionality (e.g. like style="files,extensions:tiff" for File[] parameters).
We could for example do something like this:
#@ Double (style="slider,format:0.000000")
| void setValue(Module module, T value); | ||
|
|
||
| /** Gets the item's format*/ | ||
| String getFormat(); |
There was a problem hiding this comment.
This new API will break all implementations of ModuleItem (except those extending AbstractModuleItem, of course). It requires increasing the major version of scijava-common to 3.x.x..
| * Test commands for verifying that invalid module parameters are dealt with | ||
| * using proper error handling. | ||
| * | ||
| * @author Curtis Rueden |
There was a problem hiding this comment.
@ctrueden isn't the author of this class, right? I suppose this was just copy-pasted from the other test class?
|
I'm closing this is now in favor of a backwards-compatible solution using the |
Added format attribute to @parameter for formating the value in the SwingNumberWidget
Intended to fix:
scijava/scijava-ui-swing#45